package com.qzct.service.impl;

import com.mybatisflex.spring.service.impl.ServiceImpl;
import com.qzct.entity.User;
import com.qzct.mapper.UserMapper;
import com.qzct.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 服务层实现。
 *
 * @author 闽闽
 * @since 2024-12-07
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public User login(String username, String password) {
        return userMapper.login(username, password);
    }

    @Override
    public void forget(String mail) {
        Integer getid = userMapper.getid(mail);
        userMapper.updatePwd(getid);
    }
}
